Skip to content
This repository was archived by the owner on Apr 8, 2019. It is now read-only.

Sets errorContext error when availability check fails#7

Open
dorothyfu wants to merge 1 commit intomasterfrom
bug/offlineCrash
Open

Sets errorContext error when availability check fails#7
dorothyfu wants to merge 1 commit intomasterfrom
bug/offlineCrash

Conversation

@dorothyfu
Copy link
Contributor

Description
Sets errorContext to be .noDate to prevent the crash since we don't have any error handling for no network connectivity yet. Can be set to a more descriptive error when we do.

Issues that should be CLOSED by merge of this PR:

  • Fixes #128

Related issues that should be LINKED to this PR:

  • Connects #

func availabilityCheckDidFailWith(_ error: Error) {
tableView.isUserInteractionEnabled = true

errorContext?.error = BookingError.noDate
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the same error.. noDate means date has not been provided.

Error context is not necessary for this callback.

Is there a reason you added this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add a new error to describe no network connectivity

When the availability check fails, the errorContext is not updated and the screen is not reupdated.

https://www.useloom.com/share/a1434a21f9b94d198e3f1536cd8ae293

At the end of the video there is no network connectivity, when the user tries to close the date picker by clicking on the date row, the app crashes because the amount of rows available is not updated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants